#include <iostream>
#include <vector>
//#include <string>
#include <list>
#include <unordered_map>

using namespace std;

namespace huan
{
	class string
	{
	public:

		char* str()
		{
			return _str;
		}

		size_t size()
		{
			return _size;
		}

		size_t capacity()
		{
			return _capacity;
		}

		string(const char* str = "")
			:_size(strlen(_str))
			, _capacity(_size)
		{
			char* str = new char[_capacity + 1];
			strcpy(_str, str);

		}

		string(const string& str)
		{
			string tmp(str._str);
			_size = tmp._size;
			_capacity = tmp._capacity;
		}

		~string()
		{
			if (_str)
			{
				delete[] _str;
				_str = nullptr;
				_size = 0;
				_capacity = 0;
			}
		}

	private:
		char* _str = nullptr;
		size_t _size = 0;
		size_t _capacity = 0;
		static const int pos;
	};


	void Test1()
	{

	}

}

void Test_vector()
{
	vector<int> v1;
	vector<int> v2;

	int n;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		int x;
		cin >> x;
		v1.push_back(x);

	}

	vector<int>::iterator it1 = v1.begin();
	while (it1 != v1.end())
	{
		cout << *it1 << " ";
		it1++;
	}
	cout << endl;

	unordered_map<int, int> h;

	for (int i : v1)
	{
		h[i]++;
	}

	for (int i = 0; i < n; i++)
	{
		if (h[v1[i]] == 1)
		{
			v2.push_back(v1[i]);
		}
	}

	for (int i : v2)
	{
		cout << i << " ";
	}


	list<int> l1;

}

int main()
{

	huan::Test1();

	return 0;
}